package com.phiture.erp.produce.dal.mapper;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.phiture.erp.produce.dal.entity.ErpProductionTaskDO;
import com.phiture.erp.produce.dal.pojo.vo.ErpProductionTaskRespVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;

/**
 * 生产任务 Mapper
 *
 * @author YH
 */
@Mapper
public interface ErpProductionTaskMapper extends BaseMapperX<ErpProductionTaskDO> {

    IPage<ErpProductionTaskRespVO> selectMyPage(Page<ErpProductionTaskDO> page,
                                            @Param("productionTaskNo") String productionTaskNo,
                                            @Param("saleOrderNo") String saleOrderNo,
                                            @Param("materialName") String materialName,
                                            @Param("materialId") Long materialId,
                                            @Param("status") Integer[] status,
                                            @Param("isEnableIn") Integer isEnableIn,
                                            @Param("startDate") LocalDate[] startDate,
                                            @Param("endDate") LocalDate[] endDate,
                                            @Param("tenantId") Long tenantId);
    IPage<ErpProductionTaskRespVO> selectMyPageForMobile(Page<ErpProductionTaskDO> page,
                                                         @Param("productionTaskNo") String productionTaskNo,
                                                         @Param("saleOrderNo") String saleOrderNo,
                                                         @Param("materialName") String materialName,
                                                         @Param("status") Integer[] status,
                                                         @Param("tenantId") Long tenantId,
                                                         @Param("userId") Long userId);

}